package com.ag.zrt.action;

import javax.annotation.Resource;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ag.common.BaseAction;
import com.ag.common.EventUtil;
import com.ag.zrt.service.ZRTIEventPlanService;

@Controller("ZRTEventPlanAction")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class ZRTEventPlanAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7844630165952049276L;
	@Resource(name = "ZRTEventPlanService")
	private ZRTIEventPlanService eventPlanService;
	private String result;

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public void setEventPlanService(ZRTIEventPlanService eventPlanService) {
		this.eventPlanService = eventPlanService;
	}

	public String checkPlan() {
		try {
			String eventId = (String) getSession().getAttribute(
					EventUtil.PROCESSING_EVENT_ID);
			System.out.println("----当前事件ID----------"+eventId);
			result = eventPlanService.checkPlan(eventId);
			System.out.println(result+"****************************result*******************************************");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "checkPlan_succ";
	}
}
